<?php
/**
 * 广告展示
 * User: adophper <hello@adophper.com>
 * Date: 2018/3/23
 * Time: 9:26
 */

if (!empty($data)) {
?>
<!--广告位-->
<?php
foreach ($data as $val) {
    if ($val['type'] == \common\models\Ad::AD_TYPE_IMAGE) {
?>
<a href="<?=!empty($val['url'])?$val['url']:'javascript:;'?>"><img src="<?= $val['content'] ?>"/></a>
<?php
        }
    }
}